<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .image{
            width: 100%;
            height: calc(100vh - 134px);
        }
    </style>
</head>
<body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
        <!--header-->
        <header th:include="common/header"/>
        <!--菜单-->
        <aside th:include="common/menu"/>
        <!-- 内容主体区域 -->
        <div class="layui-body">
            <div style="padding: 15px;" id="content">
                <img th:src="@{/images/bg.jpg}" class="image">
            </div>
        </div>
        <!-- 底部固定区域 -->
        <div class="layui-footer">
            Line Bot 管理系统
        </div>
    </div>
</body>
<!--js-->
<script type="text/javascript" th:src="@{/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/js/utils.js}"></script>
<script type="text/javascript">
    layui.use(['element', 'layer', 'jquery'], function(){
        const $ = layui.$
        const element = layui.element;
        element.on('nav(navbar)', function(data){
            const targetUrl = data.data('url') || ''
            if (targetUrl === ''){
                layer.msg('没有找到要跳转的路由')
                return
            }
            loadContent($, layer, targetUrl);
        });
    });
</script>
</html>